<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateExpressPackagesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('express_packages', function (Blueprint $table) {
            $table->bigIncrements('id');
//            $table->unsignedBigInteger('store_id')->comment('店铺ID');
//            $table->string('order_goods_id_array',1000)->comment('订单项商品组合列表');
//            $table->string('goods_id_array',1000)->comment('商品组合列表');
            $table->string('package_name',50)->comment('包裹名称  （包裹- 1 包裹 - 2）');
            $table->unsignedInteger('delivery_type')->default(0)->comment('发货方式1 需要物流 0无需物流');
            $table->unsignedBigInteger('express_company_id')->comment('快递公司id');
            $table->string('express_company_name')->comment('物流公司名称');
            $table->string('delivery_no',50)->comment('运单编号');
            $table->unsignedBigInteger('user_id')->comment('用户id');
            $table->unsignedBigInteger('order_id')->comment('订单ID');
            $table->string('user_name')->nullable()->comment('用户昵称');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('express_packages');
    }
}
